package com.unytech.project.entity.system;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.unytech.project.entity.BaseEntity;

/**
 * 人员实体类
 * @author 王文龙
 * 用于记录用户信息
 */
@Entity 
@Table(name="T_PERSON")
@GenericGenerator(name="uuidpk",strategy="uuid") 
public class Person extends BaseEntity {
	@Id @GeneratedValue(generator="uuidpk")
	@Column(length=32, nullable=false)
	private String persionid;
	
	private String personname;
	
	private String personsex;
	
	private String personage;
	
//	private String person
	@OneToOne(cascade={CascadeType.REFRESH,CascadeType.REMOVE}, mappedBy="person", optional=true)
	private User user;
	
}
